function createAnimate(config) {
  var startValue = config.startValue;
  var endValue = config.endValue;
  var duration = config.duration || 1000;
  var stepTime = config.stepTime || 20;
  var runningCount = Math.floor(duration / stepTime);

  var curCount = 0;
  var curVa
  var timerId = setInterval(() => {
    curCount++;
    if (curCount >= runningCount) {
      clearInterval(timerId);
      config.onendListener && config.onendListener();
    }
  }, stepTime);
}
